<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>*{margin:0;padding:0;}</style>
<script language="javascript" type="text/javascript">
function clickHandler1(){  
	 var div = document.createElement("div");
	 div.style.width = "120px"; 
	 div.style.height = "50px";
	 div.style.border = "solid 1px #000000";
	 div.innerHTML = "Hello CssRain!";
	 parent.document.body.appendChild(div);
}
function clickHandler2(){  
	 var div = parent.document.createElement("div");
	 div.style.width = "120px"; 
	 div.style.height = "50px";
	 div.style.border = "solid 1px #000000";
	 div.innerHTML = "Hello CssRain!";
	 parent.document.body.appendChild(div);
}
</script>
</head>

<body>
<h3>这里是原生的DOM方法操作</h3>
<div style="width:200px; height:20px; background:#00a; cursor:pointer; text-align:center; color:#fff;margin:10px 0;" onclick="clickHandler1()">请点击我(error)</div>
<div style="width:200px; height:20px; background:#00a; cursor:pointer; text-align:center; color:#fff;margin:10px 0;" onclick="clickHandler2()">请点击我(success)</div>
</body>
</html>
